﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RabbitMqService.Worker
{
   public  static class DebugWriter
    {
        public static void Writer(string str)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
            Debug.AutoFlush = true;
            Debug.Indent();
            Debug.WriteLine(str);
            Debug.Unindent();

        }
        public static void Writer(string str,object obj)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
            Debug.AutoFlush = true;
            Debug.Indent();
            str = string.Format(str, obj);
            Debug.WriteLine(str);
            Debug.Unindent();

        }
    }
}
